<template>
    <van-swipe :autoplay="3000" lazy-render>
    <van-swipe-item v-for="image in images" :key="image">
        <img class="item" :src="image" />
    </van-swipe-item>
    </van-swipe>
</template>

<script>
import { Swipe, SwipeItem } from 'vant';
export default {
    components: {
        'van-swipe': Swipe,
        'van-swipe-item' : SwipeItem
    },
  setup() {
    const images = [
      'https://img-blog.csdnimg.cn/20210617145217924.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L20wXzQ2NDM1NzQx,size_16,color_FFFFFF,t_70',
      'https://img-blog.csdnimg.cn/20210617150038607.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L20wXzQ2NDM1NzQx,size_16,color_FFFFFF,t_70',
    ];
    return { images };
  },
}
</script>

<style scoped>
.item {
    height: 200px;
    width: 100%;
}
</style>